const TOKEN_KEY = 'geek-pc-token'

// Token 处理工具

// 设置token
export const setToken = (token) => localStorage.setItem(TOKEN_KEY, token)

// 获取token
export const getToken = () => localStorage.getItem(TOKEN_KEY) || ''

// 清除token
// export const clearToken = () => localStorage.setItem(TOKEN_KEY, '')
export const clearToken = () => localStorage.removeItem(TOKEN_KEY)

// 用户是否登录的判断
export const isAuth = () => !!getToken()
// export const isAuth = () => {
//   if (getToken()) {
//     return true
//   } else {
//     return false
//   }
// }
